<%@ Page Language="C#" EnableViewState="false" ValidateRequest="false" AutoEventWireup="true" Inherits="Syrinx.Gui.AspNet.Nitobi2.NitobiBasePage" 
	MasterPageFile="~/App_ThemeMasters/NoStyle/AdminOneColumnLayout.Master" %>

<%@ Register Assembly="Swaf.Gui.AspNet2" Namespace="Swaf.Gui.AspNet2" TagPrefix="swf" %>
<%@ Register Assembly="ScsAspNet" Namespace="Syrinx.Gui.AspNet.Nitobi2" TagPrefix="snc" %><%@ Register Assembly="NitobiControls" Namespace="Nitobi" TagPrefix="ntb" %>
<%@ Register Assembly="ScsAspNet" Namespace="Articles.Gui.AspNet" TagPrefix="art" %>

<!--#include file="~/SiteControls/RegisterStandardControls.txt"-->
<!--#include file="../SiteControls/StandardHeaderPageContent.inc"-->
<!--#include file="../SiteControls/StandardFooterPageContent.inc"-->

<script runat="server">
	public string TitleFormat = "$company.name$ Event Notification Management";
</script>

<asp:Content ContentPlaceHolderID="title" runat="server" ID="c1">
	<%SecurityPrivilege = "AppFunctions.ManageNotification"; %>
	<div class="left"><h1><asp:Label runat="server" ID="currencyConvertLbl" >Event Notification Management</asp:Label></h1></div>
	<div class="HelpBtnArea" style="float:right">
		<asp:HyperLink runat="server" ID="_pageHelp" NavigateUrl="../std/Help.aspx?helpid=NotificationManagementHelp" Target="help">Help</asp:HyperLink>
	</div>
	<swf:BizProc ID="nm" runat="server" factoryName="notificationManagement">
		<ParentBizProc id="loginBP" />
	</swf:BizProc>

    <swf:BizProc ID="gArt1" runat="server" FactoryName="genericArticles">
		<State pid="SystemEmails" includeSelf="false" entireTree="false" EditModeSessionKey="GlobalEdit" listDetailLevel="idAndTitle" />
		<ParentBizProc id="nm" fieldName="articleId" dataId="id" />
    </swf:BizProc>
</asp:Content>

<asp:Content ContentPlaceHolderID="mainContent" runat="server" ID="c3">
	<!-- Article List Box Display -->
		<swf:BizProc runat="server" ID="mArt0" factoryName="genericArticles">
			<State id='OnlineHelp_NotificationManagementTop' includeSelf="true" /><ParentBizProc id="loginBP" /></swf:BizProc>
		<swf:DivLayers runat="server" SkinID="None" ID="ml1">
			<snc:NitobiBizObjDisplay ID="md0" runat="server"
				ReadOnlyTemplate="Articles.Gui.AspNet.ArticleRODisplay-BodyOnly" ParentBizProcIds="mArt0" />
		</swf:DivLayers>
	<!-- ALBD -->

    <snc:Grid ID="nGrid" runat="server" Width="750px" Height="250px"  
        ShowToolbar="false" ParentBizProcIds="nm" Mode="LiveScrolling">
        <Columns>
            <ntb:KeyColumn DataField="id" visible="false" />
			<ntb:ComboColumn DataField="eventId" HeaderText="System Event" width="280" DataSourceId="getNotificationEvents" GetDataUrl="/NitobiLiveStreamHandler.aspx" ValueField="name" ReadOnly="false">
				<ntb:BoundColumn DataField="name" Width="280" />
			</ntb:ComboColumn>
            <ntb:BoundColumn DataField="emailTo" HeaderText="Email To" width="150" ReadOnly="false"/>
            <ntb:BoundColumn DataField="emailFrom" HeaderText="Email From" width="150" ReadOnly="false"/>
			<ntb:ComboColumn DataField="articleId" HeaderText="Email Article" width="280" DataSourceId="getNotificationEmailArticles" GetDataUrl="/NitobiLiveStreamHandler.aspx" ValueField="id" ReadOnly="false">
				<ntb:BoundColumn DataField="id" Visible="false" />
				<ntb:BoundColumn DataField="title" Width="280" />
			</ntb:ComboColumn>
        </Columns>
    </snc:Grid>
    
<div style="height:30px;"></div>
	<!-- Article List Box Display -->
		<swf:BizProc runat="server" ID="mArt1" factoryName="genericArticles">
			<State id='OnlineHelp_NotificationManagementMid' includeSelf="true" /><ParentBizProc id="loginBP" /></swf:BizProc>
		<swf:DivLayers runat="server" SkinID="None" ID="DivLayers1">
			<snc:NitobiBizObjDisplay ID="md1" runat="server"
				ReadOnlyTemplate="Articles.Gui.AspNet.ArticleRODisplay-BodyOnly" ParentBizProcIds="mArt1" />
		</swf:DivLayers>
	<!-- ALBD -->

	<div>
        <span class="button6"><snc:ActionButton runat="server" ID="updateBtn1" Actions="gArt1.UpdateBizObj" Text="Update" /></span>
	    <span class="button1"><snc:ActionButton runat="server" ID="addBtn" Actions="gArt1.AddBizObj" Text="Add" /></span>
	    <span class="button2"><snc:ActionButton runat="server" ID="cancelBtn" Actions="gArt1.CancelEdits" Text="Cancel" /></span>
	    <span class="button5"><snc:ActionButton runat="server" ID="deleteBtn" Actions="gArt1.DeleteBizObj" Text="Delete" ClientClick="if(!confirm('Are you sure you want to delete?'))return false;"/></span>
	    <span class="button4"><snc:ActionButton runat="server" ID="editMode" Actions="gArt1.SwitchEdit" Text="Edit" SessionBoolSwitch="GlobalEdit" /></span>
	</div>

<table><tr><td>
    <div class="verticalbg"> 
	    <snc:Grid  ID="articleList1Display" runat="server" Width="320px" Height="500px"  
		    ShowToolbar="false" ParentBizProcIds="gArt1" Mode="LiveScrolling">
		    <Columns>
			    <ntb:KeyColumn DataField="id" visible="false" />
			    <ntb:BoundColumn DataField="name" HeaderText="System Emails" width="300" />
		    </Columns>
	    </snc:Grid>
    </div>
    </td><td>
        <div class="horizontalbg">
		        <art:ArticleTranslationDisplay runat="server" ID="NitobiBizObjDisplay1"
			        ParentBizProcIds="gArt1" 
			        TranslationTemplate="Articles.Gui.AspNet.ArticleTranslationRWDisplay"
			        ReadOnlyTemplate="Articles.Gui.AspNet.ArticleRODisplay-Email"
			        EditableTemplate="Articles.Gui.AspNet.ArticleRWDisplay-Email" >
		        </art:ArticleTranslationDisplay>
	        <div>
		        <span class="button6"><snc:ActionButton runat="server" ID="ActionButton1" Actions="gArt1.UpdateBizObj" Text="Update" /></span>
	        </div>
        </div>
</td></tr></table>
</asp:Content>
